// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.

/// A dyn-compatible, crate-private version of [super::ImageAnnotator].
#[async_trait::async_trait]
pub trait ImageAnnotator: std::fmt::Debug + Send + Sync {
    async fn batch_annotate_images(
        &self,
        req: crate::model::BatchAnnotateImagesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::BatchAnnotateImagesResponse>>;

    async fn batch_annotate_files(
        &self,
        req: crate::model::BatchAnnotateFilesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::BatchAnnotateFilesResponse>>;

    async fn async_batch_annotate_images(
        &self,
        req: crate::model::AsyncBatchAnnotateImagesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn async_batch_annotate_files(
        &self,
        req: crate::model::AsyncBatchAnnotateFilesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    fn get_polling_error_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy>;

    fn get_polling_backoff_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy>;
}

/// All implementations of [super::ImageAnnotator] also implement [ImageAnnotator].
#[async_trait::async_trait]
impl<T: super::ImageAnnotator> ImageAnnotator for T {
    /// Forwards the call to the implementation provided by `T`.
    async fn batch_annotate_images(
        &self,
        req: crate::model::BatchAnnotateImagesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::BatchAnnotateImagesResponse>> {
        T::batch_annotate_images(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn batch_annotate_files(
        &self,
        req: crate::model::BatchAnnotateFilesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::BatchAnnotateFilesResponse>> {
        T::batch_annotate_files(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn async_batch_annotate_images(
        &self,
        req: crate::model::AsyncBatchAnnotateImagesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::async_batch_annotate_images(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn async_batch_annotate_files(
        &self,
        req: crate::model::AsyncBatchAnnotateFilesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::async_batch_annotate_files(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::get_operation(self, req, options).await
    }

    fn get_polling_error_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy> {
        T::get_polling_error_policy(self, options)
    }

    fn get_polling_backoff_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy> {
        T::get_polling_backoff_policy(self, options)
    }
}

/// A dyn-compatible, crate-private version of [super::ProductSearch].
#[async_trait::async_trait]
pub trait ProductSearch: std::fmt::Debug + Send + Sync {
    async fn create_product_set(
        &self,
        req: crate::model::CreateProductSetRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ProductSet>>;

    async fn list_product_sets(
        &self,
        req: crate::model::ListProductSetsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListProductSetsResponse>>;

    async fn get_product_set(
        &self,
        req: crate::model::GetProductSetRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ProductSet>>;

    async fn update_product_set(
        &self,
        req: crate::model::UpdateProductSetRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ProductSet>>;

    async fn delete_product_set(
        &self,
        req: crate::model::DeleteProductSetRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;

    async fn create_product(
        &self,
        req: crate::model::CreateProductRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Product>>;

    async fn list_products(
        &self,
        req: crate::model::ListProductsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListProductsResponse>>;

    async fn get_product(
        &self,
        req: crate::model::GetProductRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Product>>;

    async fn update_product(
        &self,
        req: crate::model::UpdateProductRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Product>>;

    async fn delete_product(
        &self,
        req: crate::model::DeleteProductRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;

    async fn create_reference_image(
        &self,
        req: crate::model::CreateReferenceImageRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ReferenceImage>>;

    async fn delete_reference_image(
        &self,
        req: crate::model::DeleteReferenceImageRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;

    async fn list_reference_images(
        &self,
        req: crate::model::ListReferenceImagesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListReferenceImagesResponse>>;

    async fn get_reference_image(
        &self,
        req: crate::model::GetReferenceImageRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ReferenceImage>>;

    async fn add_product_to_product_set(
        &self,
        req: crate::model::AddProductToProductSetRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;

    async fn remove_product_from_product_set(
        &self,
        req: crate::model::RemoveProductFromProductSetRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;

    async fn list_products_in_product_set(
        &self,
        req: crate::model::ListProductsInProductSetRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListProductsInProductSetResponse>>;

    async fn import_product_sets(
        &self,
        req: crate::model::ImportProductSetsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn purge_products(
        &self,
        req: crate::model::PurgeProductsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    fn get_polling_error_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy>;

    fn get_polling_backoff_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy>;
}

/// All implementations of [super::ProductSearch] also implement [ProductSearch].
#[async_trait::async_trait]
impl<T: super::ProductSearch> ProductSearch for T {
    /// Forwards the call to the implementation provided by `T`.
    async fn create_product_set(
        &self,
        req: crate::model::CreateProductSetRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ProductSet>> {
        T::create_product_set(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_product_sets(
        &self,
        req: crate::model::ListProductSetsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListProductSetsResponse>> {
        T::list_product_sets(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_product_set(
        &self,
        req: crate::model::GetProductSetRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ProductSet>> {
        T::get_product_set(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_product_set(
        &self,
        req: crate::model::UpdateProductSetRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ProductSet>> {
        T::update_product_set(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_product_set(
        &self,
        req: crate::model::DeleteProductSetRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::delete_product_set(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn create_product(
        &self,
        req: crate::model::CreateProductRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Product>> {
        T::create_product(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_products(
        &self,
        req: crate::model::ListProductsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListProductsResponse>> {
        T::list_products(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_product(
        &self,
        req: crate::model::GetProductRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Product>> {
        T::get_product(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_product(
        &self,
        req: crate::model::UpdateProductRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Product>> {
        T::update_product(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_product(
        &self,
        req: crate::model::DeleteProductRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::delete_product(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn create_reference_image(
        &self,
        req: crate::model::CreateReferenceImageRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ReferenceImage>> {
        T::create_reference_image(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_reference_image(
        &self,
        req: crate::model::DeleteReferenceImageRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::delete_reference_image(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_reference_images(
        &self,
        req: crate::model::ListReferenceImagesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListReferenceImagesResponse>> {
        T::list_reference_images(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_reference_image(
        &self,
        req: crate::model::GetReferenceImageRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ReferenceImage>> {
        T::get_reference_image(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn add_product_to_product_set(
        &self,
        req: crate::model::AddProductToProductSetRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::add_product_to_product_set(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn remove_product_from_product_set(
        &self,
        req: crate::model::RemoveProductFromProductSetRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::remove_product_from_product_set(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_products_in_product_set(
        &self,
        req: crate::model::ListProductsInProductSetRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListProductsInProductSetResponse>>
    {
        T::list_products_in_product_set(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn import_product_sets(
        &self,
        req: crate::model::ImportProductSetsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::import_product_sets(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn purge_products(
        &self,
        req: crate::model::PurgeProductsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::purge_products(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::get_operation(self, req, options).await
    }

    fn get_polling_error_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy> {
        T::get_polling_error_policy(self, options)
    }

    fn get_polling_backoff_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy> {
        T::get_polling_backoff_policy(self, options)
    }
}
